package chapter5.No5_1_定时器Timer的使用.demo9;

import java.util.Date;
import java.util.Timer;

/**
 * timer.schedule(m1, 4000); 当前时间延迟4秒执行
 */
public class Main {
    public static void main(String[] args) {
        MyTask m1 = new MyTask();
        System.out.println(new Date());

        Timer timer = new Timer();
        timer.schedule(m1, 4000);

    }
}
